<HTML><HEAD><TITLE>Connection.js</TITLE></HEAD><BODY>
<A NAME="_top_"></A><PRE><A HREF="index.html">Index Files</A> </PRE><HR/>
<H1>File Connection.js</H1>
 Provides all methods used to dispatch messages. <P><DL><DT><B>Author:</B></DT><DD>Carlos Eduardo Goncalves</DD></DL></P>
<HR/>
<A HREF=#Connection>Connection</A><BR/>
<A HREF=#Connection.sendMessage>Connection.sendMessage</A><BR/>
<A HREF=#Connection.sendFormByMessage>Connection.sendFormByMessage</A><BR/>
<A HREF=#Connection.callWebService>Connection.callWebService</A><BR/>
<A HREF=#Connection.abortMessage>Connection.abortMessage</A><BR/>
<HR/>
<A NAME=Connection></A>
<H2>Constructor Connection</H2><PRE>function Connection()</PRE>  <p>AJAX connection constructor.<P></P><BR/><BR/>
<A NAME=Connection.sendMessage></A>
<H2> Method Connection.sendMessage</H2><PRE>Connection.sendMessage = function(msg)</PRE>  <p>Send a message after to add it to the message queue.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> value object. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine. </DD></DL><DL><DT><B>Throws:</B></DT><DD>Exception that informs if the parameter is not a <code>Message</code> object.</DD></DL></P><BR/><BR/>
<A NAME=Connection.sendFormByMessage></A>
<H2> Method Connection.sendFormByMessage</H2><PRE>Connection.sendFormByMessage = function(msg, form, encrypt)</PRE>  <p>Copy a form to a message, and sent the message after to add it to the message queue.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> value object. </TD></TR><TR><TD><I>form</I></TD><TD><code>HTMLForm</code> to be sent with the message. </TD></TR><TR><TD><I>encrypt</I></TD><TD><code>Boolean</code> flag that defines if form data must be encrypted. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine. </DD></DL><DL><DT><B>Throws:</B></DT><DD>Exception that informs if the parameter is not a <code>Message</code> object.</DD></DL></P><BR/><BR/>
<A NAME=Connection.callWebService></A>
<H2> Method Connection.callWebService</H2><PRE>Connection.callWebService = function(msg, rpc)</PRE>  <p>Use a message to call a web service method, after to add the message to the message queue.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg</I></TD><TD><code>Message</code> value object. </TD></TR><TR><TD><I>rpc</I></TD><TD><code>RemoteMethod</code> instance that will be called. </TD></TR></TABLE><DL><DT><B>Returns:</B></DT><DD><code>Message</code> id generated by the engine. </DD></DL><DL><DT><B>Throws:</B></DT><DD>Exception that informs if the parameters are not a <code>Message</code> object and a  <code>RemoteMethod</code> object respectively.</DD></DL></P><BR/><BR/>
<A NAME=Connection.abortMessage></A>
<H2> Method Connection.abortMessage</H2><PRE>Connection.abortMessage = function(msg_id)</PRE>  <p>Abort a message request and remove it from the message queue.</p> <P><TABLE WIDTH="90%" BORDER=1><TR BGCOLOR=#BDB3C4><TD><B>Parameter</B></TD><TD><B>Description</B></TD></TR><TR><TD><I>msg_id</I></TD><TD><code>Message</code> unique identifier on message queue.</TD></TR></TABLE></P><BR/><BR/>
</BODY></HTML>
